<template>
  <div>
    <van-tabs
      v-model="activeName"
      background="#F5F5F5"
      color="#BBD2F4"
      line-width="48px"
      line-height="6px"
    >
      <van-tab title="动态" name="a">
        <van-search
          left-icon=""
          v-model="value"
          shape="round"
          background="#f5f5f5"
          placeholder="搜索发现更多护肤内容"
        />
        <div class="s-icon">
          <img src="../../components/Find/img/dingzhi_icon_sousuo.png" alt="" />
        </div>
        <div class="main">
          <div class="main-a" v-for="(item, index) in FindDate" :key="index">
            <img class="main-pic" :src="item.img" alt="" />
            <div class="main-b">
              <p>草莓鼻做好“卸货”准备！夏天到了我脸部的油脂分泌旺盛…</p>
              <div class="main-c">
                <img
                  class="main-pic1"
                  src="../../components/Find/img/faxian_icon_touxiang.png"
                  alt=""
                />
                <span>{{ item.name }}</span>
                <i>{{ item.assist }}</i>
                <img
                  class="main-pic2"
                  src="../../components/Find/img/faxian_icon_aixin.png"
                  alt=""
                />
              </div>
            </div>
          </div>
        </div>
      </van-tab>

      <van-tab title="文章" name="b">
        <img
          class="main-pic3"
          src="../../components/Find/img/faxian_icon_empty.png"
          alt=""
        />
      </van-tab>
      <van-tab title="评论" name="c">
        <img
          class="main-pic3"
          src="../../components/Find/img/faxian_icon_empty.png"
          alt=""
        />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { findAPI } from "../../services/FindDate";
export default {
  data() {
    return {
      value: "",
      activeName: "a",
      FindDate: [],
    };
  },

  //   接口
  async created() {
    const findDates = await findAPI();
    // 定义一个空数组用来接收
    console.log(findDates);
    this.FindDate = findDates.data;
    console.log(this.FindDate);
  },
};
</script>

<style lang="scss" >


body {
  height: 1624px;
  background: #f5f5f5;
}
/* 选项卡 */
.van-tab {
  font-size: 24px;
  padding: 0;
  line-height: 300px;
  color: #1f1f1f;
  border: 0;
}
.van-tabs__line {
  border-radius: 0;
  bottom:3px
}
/* 搜索框 */

.van-tabs__nav--line {
  padding: 0;
}

.van-tab__pane {
  height: 65px;
}
.van-field__control {
  text-indent: 86px;
  height: 60px;
  color: #999999;
  line-height: 55px;
  font-size: 20px;
  border-radius: 30px;
  background-color: #fff;
}
.s-icon {
  display: block;
  position: absolute;
  color: #888888;
  left: 60px;
  top: 65px;
}
.s-icon img{
  width:37px;
  height: 37px;
}
/* 发现内容 */
.main {
  width: 750px;
  padding-left: 25px;
  padding-right: 25px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.main-a {
  width: 335px;
  height: 356px;
  background: #fff;
  margin-bottom: 28px;
}
.main-pic {
  width: 335px;
  height: 224px;
}
.main-b {
  width: 335px;
  height: 60px;
  background: #fff;
  margin: 0 auto;
  box-sizing: border-box;
}
.main-b p {
  width: 305px;
  height: 60px;
  font-size: 22px;
  font-family: PingFang SC-Light, PingFang SC;
  font-weight: 300;
  color: #5a5959;
  line-height: 33px;
  padding: 6px 6px 0 10px;
}
.main-c {
  width: 334px;
  height: 42px;
  /* background: red; */
  margin-top: 15px;
  box-sizing: border-box;
  padding: 0px 6px 0 10px;
}
.main-c .main-pic1 {
  margin-top: 6px;
  width: 33px;
  height: 33px;
  float: left;
}
.main-c span {
  width: 140px;
  height: 28px;
  margin-top: 6px;
  font-size: 20px;
  font-family: PingFang SC-Regular, PingFang SC;
  font-weight: 400;
  color: #5a5959;
  line-height: 33px;
  margin-left: 8px;
  float: left;
  box-sizing: border-box;
}
.main-c .main-pic2 {
  margin-top: 15px;
  margin-right: 3px;
  width: 18px;
  height: 16px;
  float: right;
}
.main-c i {
  width: 30px;
  height: 28px;
  font-size: 20px;
  font-family: PingFang SC-Light, PingFang SC;
  font-weight: 300;
  color: #5a5959;
  line-height: 0px;
  font-style: normal;
  float: right;
  margin-top: 6px;
  line-height: 33px;
  box-sizing: border-box;
}

.main-pic3 {
  margin-top: 50px;
  margin-left: 125px;
  width: 500px;
  height: 380px;
}
</style>
